#include "StdAfx.h"
#include "TTChatMsgSessionHandler.h"
#include "TTChatClient.h"

CTTChatMsgSessionHandler::CTTChatMsgSessionHandler(void)
{
	m_pClient=NULL;
	m_pSession=NULL;
	m_pMessageHandler=NULL;
}

CTTChatMsgSessionHandler::CTTChatMsgSessionHandler( CTTChatClient* pClient )
{
	CTTChatMsgSessionHandler();
	m_pClient=pClient;
}

CTTChatMsgSessionHandler::~CTTChatMsgSessionHandler(void)
{
}

void CTTChatMsgSessionHandler::handleMessageSession( MessageSession *session )
{
	m_pClient->m_pClient->disposeMessageSession(m_pSession);
	m_pSession=session;
	m_pMessageHandler=new CTTChatMessageHandler(m_pClient);
	m_pSession->registerMessageHandler( m_pMessageHandler );
	//m_messageEventFilter = new MessageEventFilter( m_session );
	//m_messageEventFilter->registerMessageEventHandler( this );
	//m_chatStateFilter = new ChatStateFilter( m_session );
	//m_chatStateFilter->registerChatStateHandler( this );
}
